]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Avoid warnings on leave-event for widgets tracking hover
authorGiovanni Campagna <gcampagna@src.gnome.org>
Sun, 24 Oct 2010 12:30:03 +0000 (14:30 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 25 Oct 2010 13:18:07 +0000 (15:18 +0200)
ClutterCrossingEvent->related can be NULL if the pointer is not under
any actor. Unconditionally set hover to FALSE in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=633028

src/st/st-widget.c

index e5f30509f7011e4ec27edf1b9420edf0545d25ac..48c7a3dde74a199b40dfdc2e42a0d5d806a7a3ef 100644 (file)
@@ -594,7 +594,7 @@ st_widget_leave (ClutterActor         *actor,
 
   if (priv->track_hover)
     {
-      if (!clutter_actor_contains (actor, event->related))
+      if (!event->related || !clutter_actor_contains (actor, event->related))
         st_widget_set_hover (ST_WIDGET (actor), FALSE);
     }